﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Generate.aspx.cs" Inherits="Generate" MasterPageFile="~/MasterPage.master" EnableEventValidation="false" Title="Generate Resources &raquo; ResourceBlender.NET" %>
<%@ Register TagPrefix="L49" TagName="ApplicationSelector" Src="~/ApplicationSelector.ascx" %>

<asp:Content ID="contentHead" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>

<asp:Content ID="contentMain" ContentPlaceHolderID="cntMain" runat="server">
    <asp:ScriptManager ID="scrUpdateLanguages" runat="server"></asp:ScriptManager>
    <h1 id="generateHeader">Generate Resources</h1>
    <div class="breadcrumbs">
        <asp:HyperLink ID="lnkNavHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender.NET</asp:HyperLink> &gt; Generate
    </div>
    <asp:MultiView ID="mltNoApplications" runat="server" ActiveViewIndex="0">
        <asp:View ID="viwNoApps" runat="server">
            <p>You must <asp:HyperLink ID="lnkAddApplication" runat="server" Text="add an application" NavigateUrl="~/Applications.aspx">add an application</asp:HyperLink> before generating resources.</p>
        </asp:View>
        <asp:View ID="viwGenerate" runat="server">
            <div class="niceform">
                <L49:ApplicationSelector ID="appSelector" runat="server" />
                <fieldset class="plain">
                    <legend>Options</legend>
                    <asp:Label ID="lblThreshold" runat="server" Text="Completion Threshold (Percent)" AssociatedControlID="txtThreshold"></asp:Label>
                    <asp:TextBox ID="txtThreshold" runat="server" CssClass="block"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="requiredThreshold" runat="server" 
                        ErrorMessage="You must enter the completion threshold" 
                        ControlToValidate="txtThreshold" 
                        CssClass="error" 
                        Display="Dynamic" />
                    <div class="checks clear">
                        <asp:CheckBox ID="chkIncludeSummary" runat="server" Checked="True" CssClass="block"
                            Text="Include Summary" />
                        <asp:CheckBox ID="chkEscapeUnicode" runat="server" Checked="True" CssClass="block"
                            Text="Escape unicode characters (Java only)" />
                    </div>
                </fieldset>
                <fieldset>
                    <legend>Output Format</legend>
                    <div class="formrow block">
                        <div class="formcol">
                            <label class="block">Format</label>
                            <asp:RadioButtonList ID="radFormat" runat="server" RepeatLayout="Flow" 
                                CssClass="checks applicationChecks typeChecks plain"></asp:RadioButtonList>
                            <asp:CustomValidator ID="vldFormatRequired" runat="server" 
                                ControlToValidate="radFormat"  Display="Dynamic"
                                ErrorMessage="Output format must be specified" CssClass="block"
                                OnServerValidate="vldFormatRequired_ServerValidate" ValidateEmptyText="True">
                            </asp:CustomValidator>
                            <asp:Label ID="lblBundleError" runat="server" Text="" Visible="false" CssClass="block error"></asp:Label>
                        </div>
                    </div>
                </fieldset>
                <div class="actions">
                    <asp:Button ID="btnResources" runat="server" Text="Generate Resources" OnClick="btnGenerate_Click" CssClass="uniformbutton doublewidth btnGo" />
                </div>
                <br />
            </div>
        </asp:View>
    </asp:MultiView>
</asp:Content>